package com.feng.study.demo.jackson;

import com.feng.study.model.Product;
import com.feng.study.util.JsonUtils;

/**
 * vjtools
 * 对jackson的封装
 */
public class VjtoolsDemo {
    public static void main(String[] args) {
        jsonToBeanDemo();
    }

    public static void jsonToBeanDemo(){
        String s="{\n" +
                "  \"productId\":\"111\",\n" +
                "  \"name\":\"222\",\n" +
                "  \"aaa\":\"333\"\n" +
                "}";
        Product product = JsonUtils.jsonToBean(s, Product.class);
        System.out.println(product);
    }
}
